<#
 * FileName: Microsoft.PowerShell_profile.ps1
 * Author: 刘 鹏
 * Email: littleNewton6@outlook.com
 * Date: 2021, Aug. 21
 * Copyright: No copyright. You can use this code for anything with no warranty.
#>

# Automation
$clx_162 = "ipmitool -H 172.22.27.162 -U root -P root -I lanplus "
$starlake_149 = 'ipmitool -H 172.22.27.149 -U root -P root -I lanplus '

# BMCQA
$kuaishou_177 = 'ipmitool -I lanplus -H 172.22.12.177 -U root -P Ucloud.cn '
$kunlun_147 = 'ipmitool -I lanplus -H 172.22.12.147 -U root -P root '
$starlake_152 = 'ipmitool -I lanplus -H 172.22.12.152 -U root -P root '
$meituan_208 = 'ipmitool -H 172.22.12.208 -U root -P "M9&nj4Y3t" -I lanplus '
$chcp = "936, 65001"


function ipmi_cmd([string]$cmd){

    $servers = @($clx_162, $starlake_149, $kuaishou_177, $kunlun_147, $starlake_152, $meituan_208)

    foreach($server in $servers){
        echo "$server  $cmd"
        $output = Invoke-Expression ($server + $cmd)
        echo "output: $output"
        echo ''
        echo ''
    }
}


	
$python_c = 'python -c "import sys; print(sys.path)"'

function pip_install([string]$module){
    $douban = "python -m pip install {0} -i http://pypi.douban.com/simple --trusted-host pypi.douban.com "
    $cmd = $douban -f $module
    Write-Output  "Invoke-Expression(`"$cmd`")"
    Invoke-Expression($cmd)
}


#------------------------------- Import Modules BEGIN -------------------------------
# 引入 posh-git
Import-Module posh-git

# 引入 oh-my-posh
Import-Module oh-my-posh

# 引入 ps-read-line
Import-Module PSReadLine

# 设置 PowerShell 主题
# Set-PoshPrompt ys
# Set-PoshPrompt paradox
Set-PoshPrompt -Theme Paradox

Import-Module Get-ChildItemColor
Import-Module psscheduledjob -SkipEditionCheck
#------------------------------- Import Modules END   -------------------------------

#------------------------------- Run Command Start   -------------------------------



# print system infomation
#neofetch

#------------------------------- run Command END   -------------------------------



#-------------------------------      Set Environment Variables    -------------------------------

$env:path = "$env:path;E:\ipmitool"

